<?php

namespace Kateba\RestaurantBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Kateba\RestaurantBundle\Entity\Extra
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Kateba\RestaurantBundle\Entity\ExtraRepository")
 */
class Extra {

    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var Doctrine\Common\Collections\ArrayCollection $prices
     * 
     * @ORM\OneToMany(targetEntity="Kateba\RestaurantBundle\Entity\ExtraPrice", mappedBy="extra", cascade={"all"}, orphanRemoval=true)
     */
    private $prices;

    /**
     * @var string $name
     *
     * @ORM\Column(name="name", type="string", length=255)
     */
    private $name;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId() {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     */
    public function setName($name) {
        $this->name = $name;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName() {
        return $this->name;
    }

    public function __construct() {
        $this->prices = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Add prices
     *
     * @param Kateba\RestaurantBundle\Entity\ExtraPrice $prices
     */
    public function addExtraPrice(\Kateba\RestaurantBundle\Entity\ExtraPrice $prices) {
        $this->prices[] = $prices;
    }

    /**
     * Get prices
     *
     * @return Doctrine\Common\Collections\Collection 
     */
    public function getPrices() {
        return $this->prices;
    }

}